package com.xiaoyu.system.controller;


import com.xiaoyu.common.core.result.R;
import com.xiaoyu.system.entity.SystemLog;
import com.xiaoyu.system.service.ISystemLogService;
import lombok.AllArgsConstructor;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zgb
 * @since 2020-10-30
 */
@RequestMapping("systemLog")
@RestController
@AllArgsConstructor
public class SystemLogController {


    private final ISystemLogService iSystemLogService;

    @Trace
    @Tags({@Tag(key = "param",value = "arg[0]"),
            @Tag(key = "systemLog",value = "returnObj")})
    @RequestMapping("/seataTest")
    public R seataTest(SystemLog systemLog) throws Exception {
        return iSystemLogService.testSeataGlobalTransactional();
    }



}
